<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page import="com.webmeeting.chat.wordchat.daomanagers.UserManager"%>
<%@page import="com.webmeeting.chat.wordchat.entities.User"%>
<%@page import="com.webmeeting.chat.wordchat.daos.UserDAOMySQLImpl"%>
<html>
<head>
<title>Web Meeting System - Chat System</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="/js/jquery/jquery-1.8.1.min.js" ></script>
<script type="text/javascript" src="/js/chat/wordchat/wordchat.js" ></script>

<link type="text/css" rel="stylesheet" href="/css/chat/wordchat/wordchat.css" />
</head>
<body>
<%-- 
<%
long id = UserManager.createUser("Lufei", "12345");
%>
<%
User user = UserManager.findUserByName("Lufei");
%>
<%="Username: " + user.getUsername() %>
<%="Password: " + user.getPassword() %>
<%="Created date: " + user.getCreatedDate() %>
<%
UserManager.deleteUser("Lufei");
%>
--%>
<%-- 
	<%String server = request.getServerName(); %>
	<label id="usernameLbl">Input your name:&nbsp;</label>
	<input type="text" id="usernameTxt" onkeydown="wordChat.login(event, '<%=server%>', 'chatArea', 'msg', 'usernameTxt');"></input>
	<input type="button" value="Connect" id="connectBtn" onclick="wordChat.startWebSocket('<%=server%>', 'chatArea', 'msg', 'usernameTxt');"></input>
	<input type="button" value="Disconnect" id="disconnectBtn" onclick="wordChat.close();"></input><br/>
	<label id="msg">Disconnect!</label><br/>
	<textarea id="chatArea" readonly="readonly"></textarea><br/>
	<input type="text" id="writeMsg" onkeydown="wordChat.enterPress(event);"></input>
	<input type="button" value="send" onclick="wordChat.sendMsg('writeMsg')"></input>
	<input type="button" value="clear" onclick="wordChat.clearMsg('chatArea')"></input>
--%>
</body>
</html>